﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace DevelopTools.UI
{
    /// <summary>
    /// UI动画播放-旋转
    /// </summary>

    public class UIAnimation_RotEffect : UIAnimation
    {

        /// <summary>
        /// UI旋转方向：1：
        /// </summary>
        public int RotateDirect = 1;

        // Use this for initialization
        public override void Start()
        {
            base.Start();
        }

        // Update is called once per frame
        public override void Update()
        {

        }

        public override void PlayAnimation()
        {
            transform.Rotate(Vector3.forward * RotateDirect, speed * Time.deltaTime);
        }
        /// <summary>
        /// 加速旋转
        /// </summary>
        public override void SetFast()
        {
            speed = normalSpeed * multipleSpeed;
        }
        /// <summary>
        /// 原速旋转
        /// </summary>
        public override void SetNomal()
        {
            speed = normalSpeed;
        }
    }

}